package com.example.controller;


import com.example.entity.UserInfo;
import com.example.service.UserInfoService;
import com.example.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author chengtaoxie
 * @since 2023-07-21
 */
@Api(tags = "用户信息管理")
@RestController
@RequestMapping("/user-info")
public class UserInfoController {

    @Resource
    private UserInfoService userInfoService;

    /**
     * 用户注册
     * @param userInfo
     * @return
     */
    @ApiOperation("用户注册")
    @PostMapping("/regist")
    public Result register(UserInfo userInfo){
        return userInfoService.register(userInfo);
    }

}

